<extend name="Base/common" />

<block name="style">
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/Api/css/order.css">
</block>

<block name="Content">

<div class="page-group">
    <div class="page page-current">
        <div class="content my-order-coupon">
            <!--优惠券1-->
            <div class="list-block media-list">
                <ul>
                	<notempty name="list">
                		<notempty name="list['available']">
	                		<foreach name="list['available']" item="coupon">
			                    <li onclick="window.location.href='{:U('WeChatApi/jsApiCall', 'order_id='.$order_id.'&coupon_id='.$coupon['coupon_id'])}'">
			                        <label class="label-checkbox item-content">
			                            <div class="item-inner">
			                                <div class="coupon">
			                                    <div class="coupon-text">
			                                        <p>帮工小哥</p>
			                                        <div class="coupon-detail clearfix">
			                                            <span class="left coupon-money">￥{$coupon['money']}</span>
			                                            <div class="coupon-use right">
			                                                <p>本次可使用</p>
			                                                <p class="coupon-date">{$coupon['create_time']|GetDateMk}--{$coupon['deadline']|GetDateMk}</p>
			                                            </div>
			                                        </div>
			                                    </div>
			                                    <!--使用优惠条件-->
			                                    <div class="condition">
			                                        <ul>
			                                            <li>
			                                            	<i class="list-disc"></i>
			                                            	<if condition="$coupon.minimum eq '0'">
			                                            		定额优惠
			                                            	<else/>
			                                            		满{$coupon['minimum']}元可用
			                                            	</if>
			                                            </li>
			                                            <li><i class="list-disc"></i>优惠码 {$coupon['code']}</li>
			                                        </ul>
			                                    </div>
			                                </div>
			                            </div>
			                        </label>
			                    </li>
			                </foreach>
			            </notempty>
			            
			            <notempty name="list['unavailable']">
	                		<foreach name="list['unavailable']" item="coupon">
	                			<li>
			                        <label class="label-checkbox item-content">
			                            <div class="item-inner">
			                                <div class="coupon coupon-dis">
			                                    <div class="coupon-text">
			                                        <p>帮工小哥</p>
			                                        <div class="coupon-detail clearfix">
			                                            <span class="left coupon-money">￥{$coupon['money']}</span>
			                                            <div class="coupon-use right">
			                                                <p>本次不可使用</p>
			                                                <p class="coupon-date">{$coupon['create_time']|GetDateMk}--{$coupon['deadline']|GetDateMk}</p>
			                                            </div>
			                                        </div>
			                                    </div>
			                                    <!--使用优惠条件-->
			                                    <div class="condition">
			                                        <ul>
			                                            <li>
			                                            	<i class="list-disc list-disc-gray"></i>
			                                            	<if condition="$coupon.minimum eq '0'">
			                                            		定额优惠
			                                            	<else/>
			                                            		满{$coupon['minimum']}元可用
			                                            	</if>	
			                                            </li>
			                                        </ul>
			                                    </div>
			                                </div>
			                            </div>
			                        </label>
			                    </li>
			                </foreach>
			            </notempty>
		            <else/>
		            	暂无可用优惠券
		            </notempty>
                    <!--失效的优惠券-->
                    
                </ul>
            </div>
        </div>
    </div>
</div>

</block>

<block name="script">
<script type="text/javascript">




</script>
</block>

